how to calculate average rate of change on an interval